-- GENERATED SPELL FOR [Gravelflint Geomancer] --


function spell0_2160(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(19816,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2160', 3000, 1)
end

function spell1_2160(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_2160', 0, 1)
end

function Sorts_2160(pUnit, Event)
local choix_sorts_2160 = math.random(0, 1)
if choix_sorts_2160 == 0 then
pUnit:RegisterEvent('spell0_2160', 1, 1)
end
if choix_sorts_2160 == 1 then
pUnit:RegisterEvent('spell1_2160', 1, 1)
end
end

function mob2160_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2160', math.random(1500, 3000), 1)
end

function mob2160_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2160_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2160_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2160, 1, 'mob2160_Action')
RegisterUnitEvent(2160, 2, 'mob2160_Leave')
RegisterUnitEvent(2160, 3, 'mob2160_Kill')
RegisterUnitEvent(2160, 4, 'mob2160_Die')
